package app.server.project.core.exception;

import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class GlobalException extends RuntimeException {
    private int code;
    private String msg;

    public static GlobalException of(int code) {
        return new GlobalException()
                .setCode(code);
    }

    public static GlobalException of(String msg) {
        return new GlobalException()
                .setMsg(msg);
    }
}
